package com.kbt.ui;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.PopupWindow;
import com.kbt.activity.R;
import com.kbt.listener.PopWindowDismissListener;
import com.kbt.util.tool.PopWindowSetting;

/**
 *
 */
public class ShareFriendPopWindow extends PopupWindow {

    //生命周期
    private Activity context;
    private View vi;

    /**
     * @param context
     * @param
     */
    public ShareFriendPopWindow(Activity context) {
        //初始化信息
        super(context);
        this.context = context;

        //获取布局信息
        LayoutInflater inflater = (LayoutInflater) context
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        vi = inflater.inflate(R.layout.share_for_friend_pop, null);


        //设置SelectPicPopupWindow的View
        this.setContentView(vi);
        //设置弹出窗口样式
        PopWindowSetting.setPopWindowStyle(this);

        //设置父窗体背景
        PopWindowSetting.setParentBackGround(context, 0.3f);

        //设置窗口销毁时事件
        PopWindowDismissListener dismissListener = new PopWindowDismissListener(context);
        this.setOnDismissListener(dismissListener);


    }


}
